# This script installs the utilities and development tools I find most useful.
#
# Requires about 7M to install, 4M after installation.
#
# To install:
#   cd /mint
#   sh setup/normal.sh
#
# The following archives should be in your $SAVE directory:
#
# (Atari Archive)
# Mint/Lib/mntinc44.zoo
# Mint/Lib/mntolb44.zoo
# Mint/Gcc/bgas138p4.zoo
# Mint/Gcc/mgutil36.zoo
# Mint/Gcc/bmake363.zoo
# Mint/Shells/tcsh6033.zoo
# Mint/Utilities/diff21.zoo
# Mint/Utilities/find-37.zoo
# Mint/Utilities/grep16.zoo
# Mint/Utilities/mperl.zoo
# Mint/Utilities/patch.zoo
# Languages/slperl.zoo
# Gnustuff/Tos/Othergnu/less-177.zoo
# Gnustuff/Tos/Curses/crsolb16.zoo
# Gnustuff/Tos/Pmathlib/pmlolb21.zoo
#
# (MacMiNT Archive)
# macgcc258b.tar.gz

PATH=/usr/local/bin:/bin:/usr/bin:$MGNU/bin:.
export PATH

# check for everything
for i in \
		mntinc44.zoo mntolb44.zoo \
		crsolb16.zoo pmlolb21.zoo \
		bgas138p4.zoo mgutil36.zoo \
		bmake363.zoo \
		mperl.zoo slperl.zoo \
		tcsh6033.zoo less-177.zoo \
		find-37.zoo grep16.zoo diff21.zoo patch.zoo \
		macgcc258b.tar.gz \
			; do
	if [ ! -r $SAVE/$i ] ; then
		echo "can't find $SAVE/$i"
		exit 1
	fi
done

mkdir -p usr/lib/perl

cd usr

echo mntinc
zoo xq $SAVE/mntinc44.zoo
mv mntinc include

cd lib

echo mntolb
zoo xq $SAVE/mntolb44.zoo 'm*.o' 'm*.olb'
mv mcrt0.o crt0.o
mv mgcrt0.o gcrt0.o
mv miio.olb iio.olb
mv miio16.olb iio16.olb
mv mint.olb gnu.olb
mv mint16.olb gnu16.olb

echo curses
zoo xq $SAVE/crsolb16.zoo 'c*.olb' 't*.olb' 'w*.olb'

echo pml
zoo xq $SAVE/pmlolb21.zoo pml.olb pml16.olb

cd perl

echo perl
zoo xq: $SAVE/slperl.zoo 'lib/*'

cd ../../bin

zoo xq $SAVE/mperl.zoo mperl.ttp
mv mperl.ttp perl.ttp

echo gas
zoo xq $SAVE/bgas138p4.zoo

echo gutil
zoo xq $SAVE/mgutil36.zoo

echo make
zoo xq: $SAVE/bmake363.zoo make.ttp

echo tcsh
zoo xq: $SAVE/tcsh6033.zoo tcsh

echo less
zoo xq: $SAVE/less-177.zoo less.ttp less.hlp
mv less.hlp ../../etc

echo grep
zoo xq: $SAVE/grep16.zoo grep.ttp

echo diff
zoo xq: $SAVE/diff21.zoo diff.ttp

echo find
zoo xq: $SAVE/find-37.zoo find.ttp

echo patch
zoo xq: $SAVE/patch.zoo patch.ttp

echo gcc
gzip -d < $SAVE/macgcc258b.tar.gz | tar xf -

